<tc_include file="Public:header" />
<link href="__PUBLIC__/js/datePicker/mobiscroll.2.13.2.css" rel="stylesheet" />
  <div id="content-container" class="container">
      <if condition="empty($avatar)">
       <div class="alert alert-warning alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <strong>您还没有头像</strong>。拥有一个独有的头像，老师和同学们能更容易关注到你哦～～ <a href="{:u('user/center/pic')}"" class="alert-link" target="_blank">点击设置</a>
	  </div>
	  <else/>
	    <if condition="empty($user['user_nicename'])">
	     <div class="alert alert-warning alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <strong>您还没设置昵称</strong>。请到个人设置里面设置～～ <a href="{:u('user/center/setting')}" class="alert-link" target="_blank">点击设置</a>
         </div>
        </if>
	 </if>
     <div class="row row-3-9">
        <div class="col-md-3">
           <div class="sidenav">
            <ul class="list-group">
               <li class="list-group-heading"><a href="{:u('Teacher/Center/index')}">我的课程</a></li>
               <li class="list-group-heading">课程管理</li>
               <li class="list-group-item "><a href="{:u('Teacher/Center/sectionlist',array('cs_id'=>$cs_id))}">课时管理</a></li>
			   <if condition="$cs_type==normal">
                 <li class="list-group-item active"><a href="{:u('Teacher/Center/addsection',array('cs_id'=>$cs_id))}">添加课时</a></li>
			   <else/>
			     <li class="list-group-item active"><a href="{:u('Teacher/Center/addlivesection',array('cs_id'=>$cs_id))}">添加课时</a></li>
			   </if>
               <li class="list-group-item"><a href="{:u('Teacher/Center/material',array('cs_id'=>$cs_id))}">资料管理</a></li>
               <li class="list-group-item"><a href="{:u('Teacher/Center/xueyuanlist',array('cs_id'=>$cs_id))}">学员列表</a></li>
               <li class="list-group-item"><a href="{:u('Teacher/Center/pinglun',array('cs_id'=>$cs_id))}">评论列表</a></li>
			   <li class="list-group-heading">题库管理</li>
			   <li class="list-group-item"><a href="{:u('Teacher/Center/shitilist',array('cs_id'=>$cs_id))}">题目管理</a></li>
			   <li class="list-group-item"><a href="{:u('Teacher/Center/addsection',array('cs_id'=>$cs_id))}">试卷管理</a></li>
			   <li class="list-group-item"><a href="{:u('Teacher/Center/addsection',array('cs_id'=>$cs_id))}">试卷批阅</a></li>
			   <li class="list-group-item"><a href="{:u('Teacher/Center/addsection',array('cs_id'=>$cs_id))}">作业批改</a></li>
            </ul>
          </div>
        </div>
        <div class="col-md-9">	
          <div class="panel panel-default panel-col">
	        <div class="panel-heading">添加课时《{$cs_data['cs_name']}》</div>
	          <div class="panel-body">
                 <div id="myTabContent" class="tab-content">
                    <div class="tab-pane fade in active" id="vodeo">
                       <form id="user-profile-form" class="form-horizontal js-ajax-form" method="post" action="{:U('Teacher/Center/addsection_post')}">
					      <div class="form-group">
						     <label class="col-md-2 control-label">课时标题</label>
						        <div class="col-md-7 controls">
						           <input type="hidden" name="cs_id" value="{$cs_id}">
                                   <input type="hidden" name="type_id" value="0">
                                   <input type="hidden" name="video_type" id="video_type" value="1">
                                   <input type="hidden" name="section_type" value="1">
							       <input type="text" name="sc_name" id="sc_name" value="" class="form-control">
						        </div>
					      </div>
					      
					      <div class="form-group">
					           <label class="col-md-2 control-label">是否免费</label>
						       <div class="checkbox col-md-2 controls" style="margin-bottom:10px;">
                                  <label> <input type="checkbox" name="is_free" value="1" ></label>
                               </div>
					      </div>
					      <div class="form-group">
						     <label class="col-md-2 control-label">直播开始时间</label>
								<div class="settings" style="display:none;">
									<select name="demo" id="demo">
										<option value="date">日期</option>
									</select>
								</div>

						        <div class="col-md-7 controls">
						          <input class="form-control demo-test-date demo-test-datetime demo-test-time demo-test-credit" type="text" name="live_starttime" >
								   <div class="help-block" id="starttime-help-block">教师可在直播开始前半小时内进入直播教室，以准备相关教学资料。</div>
						        </div>
					      </div>
					      <div class="form-group">
						     <label class="col-md-2 control-label">直播时长</label>
						        <div class="col-md-7 controls">
							       <input type="text" name="sc_time" class="form-control">
						        </div>
					      </div>
					      
						  <div class="row">
					  	    <div class="col-md-7 col-md-offset-2">
							   <button id="profile-save-btn"  type="submit" class="btn btn-primary js-ajax-submit">添加 </button>
						   </div>
					    </div>
			           </form>
                    </div>
                 </div>	   
		      </div>
	        </div>
         </div>
     </div>
   </div>
 <div class="modal fade " id="myModal" tabindex="-1" role="dialog"  aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-body">
          
         </div>
      </div>
   </div>
 </div>  
<tc_include file="Public:scripts" /> 
<script type="text/javascript" src="__PUBLIC__/js/datePicker/mobiscroll.2.13.2.js"></script>
<script>
$("#myModal").on("hide.bs.modal", function() {
    $(this).removeData("bs.modal");
	//location.replace(location.href);
});
</script>
<script type="text/javascript">
        $(function () {
            var curr = new Date().getFullYear();
            var opt={};
			opt.date = {preset : 'date'};
			opt.datetime = {preset : 'datetime'};
			opt.time = {preset : 'time'};

          opt.default = {
				theme: 'android-holo light', //皮肤样式
		        display: 'modal', //显示方式 
		        mode: 'scroller', //日期选择模式
				dateFormat: 'yyyy-mm-dd',
				lang: 'zh',
				showNow: true,
				nowText: "今天",
				stepMinute: 5,
		        startYear: curr - 0, //开始年份
		        endYear: curr + 1 //结束年份
			};
            $('.settings').bind('change', function() {
                var demo = 'datetime';
                if (!demo.match(/select/i)) {
                    $('.demo-test-' + demo).val('');
                }
                $('.demo-test-' + demo).scroller('destroy').scroller($.extend(opt['datetime'], opt['default']));
                $('.demo').hide();
                $('.demo-' + demo).show();
            });
            $('#demo').trigger('change');
        });
    </script>

<tc_include file="Public:footer" />